<html>
  <head><title>SP Objects</title>
    <script src="codepress/codepress.js" type="text/javascript"></script> 
    <link rel="stylesheet" href="style.css" type="text/css" media="all" />
  </head>
  <body>

    <h1>Procedure Object: D_QT_DLGTN.SQL</h1>
    <p><b>Author:</b> Peter Zhou</p>
    <p><b>Date:</b> Mar. 13, 2007</p>
    <p><b>Abstract:</b></p>
    <p> Delete data from EBIZ1.WEB_QUOTE_DLGTN
  </b></p>
    <p><b>Sample Calls:</b></p>
    <p>    call EBIZ1.D_QT_DLGTN (?, '0000000022','tom_boulet@us.ibm.com','zhouke@cn.ibm.com')<br>  </b></p>
    <p></p>
    
    
    <h3>Tables:</h3>
    <ul>
      
        <li><b><a href="WEB_QUOTE_TO_CREATOR_MAPPING.html">EBIZ1.WEB_QUOTE_TO_CREATOR_MAPPING</a></b></li>
      
        <li><b><a href="WEB_QUOTE.html">EBIZ1.WEB_QUOTE</a></b></li>
      
        <li><b><a href="WEB_QUOTE_DLGTN.html">EBIZ1.WEB_QUOTE_DLGTN</a></b></li>
      
    </ul>
    
    
    
    
    
    
    
    
    <h3>Source code:</h3>
    <div id="SQLsrc" >
<em>DROP</em>&nbsp;SPECIFIC&nbsp;PROCEDURE&nbsp;EBIZ1.D_QT_DLGTN<br />@<br /><em>CREATE</em>&nbsp;PROCEDURE&nbsp;EBIZ1.D_QT_DLGTN&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;OUT&nbsp;&nbsp;poGenStatus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>INTEGER</u><br />&nbsp;&nbsp;&nbsp;&nbsp;,<b>IN</b>&nbsp;&nbsp;piWebQuoteNum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>CHARACTER</u>(10)<br />	,<b>IN</b>&nbsp;&nbsp;piCreatorId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>CHAR</u>(80)<br />&nbsp;&nbsp;&nbsp;&nbsp;,<b>IN</b>&nbsp;&nbsp;piUserId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;		<u>CHAR</u>(80)<br />)<br />&nbsp;&nbsp;&nbsp;&nbsp;RESULT&nbsp;SETS&nbsp;0<br />&nbsp;&nbsp;&nbsp;&nbsp;<b>LANGUAGE</b>&nbsp;<b>SQL</b><br />&nbsp;&nbsp;&nbsp;&nbsp;MODIFIES&nbsp;<b>SQL</b>&nbsp;DATA<br />&nbsp;&nbsp;&nbsp;&nbsp;SPECIFIC&nbsp;EBIZ1.D_QT_DLGTN<br /><i>-----------------------------------------------------------------------------------</i><br /><i>--</i><br /><i>--&nbsp;&nbsp;Procedure&nbsp;Name&nbsp;:&nbsp;D_QT_DLGTN</i><br /><i>--&nbsp;&nbsp;Specific&nbsp;Name:&nbsp;&nbsp;&nbsp;D_QT_DLGTN</i><br /><i>--&nbsp;&nbsp;File&nbsp;Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;D_QT_DLGTN.<b>SQL</b></i><br /><i>--&nbsp;&nbsp;Author:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peter&nbsp;Zhou</i><br /><i>--&nbsp;&nbsp;<u>Date</u>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mar.&nbsp;13,&nbsp;2007</i><br /><i>--</i><br /><i>--&nbsp;&nbsp;Abstract:&nbsp;<em>Delete</em>&nbsp;data&nbsp;<b>from</b>&nbsp;EBIZ1.WEB_QUOTE_DLGTN</i><br /><i>--</i><br /><i>--&nbsp;&nbsp;Sample&nbsp;Calls:</i><br /><i>--&nbsp;&nbsp;&nbsp;&nbsp;call&nbsp;EBIZ1.D_QT_DLGTN&nbsp;(?,&nbsp;<s>'0000000022'</s>,<s>'tom_boulet@us.ibm.com'</s>,<s>'zhouke@cn.ibm.com'</s>)</i><br /><i>--</i><br /><i>--&nbsp;&nbsp;MAINTENANCE&nbsp;LOG</i><br /><i>--&nbsp;&nbsp;who&nbsp;&nbsp;<u>date</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><em>comment</em></b></i><br /><i>--&nbsp;&nbsp;---&nbsp;&nbsp;--------&nbsp;&nbsp;----------------------------------------------------------------</i><br /><i>--&nbsp;&nbsp;Peter&nbsp;03/13/07&nbsp;&nbsp;&nbsp;&nbsp;Initial&nbsp;Version</i><br /><i>--&nbsp;&nbsp;Alan&nbsp;&nbsp;03/22/07&nbsp;&nbsp;&nbsp;&nbsp;Replaced&nbsp;<b>input</b>&nbsp;paramater&nbsp;piWebQuoteNum&nbsp;<b>with</b>&nbsp;piCreatorId</i><br /><i>--&nbsp;&nbsp;Will&nbsp;&nbsp;05/14/07&nbsp;&nbsp;&nbsp;&nbsp;Added&nbsp;piWebQuoteNum</i><br /><i>--&nbsp;&nbsp;Peter&nbsp;05/17/07&nbsp;&nbsp;&nbsp;&nbsp;lcase&nbsp;userId&nbsp;&&nbsp;eMailAddr&nbsp;<b>input</b>&nbsp;parameters</i><br /><i>--&nbsp;&nbsp;Waigo&nbsp;10/17/07&nbsp;&nbsp;&nbsp;&nbsp;Removed&nbsp;lcase()&nbsp;method&nbsp;<b>on</b>&nbsp;piCreatorId&nbsp;&&nbsp;piUserId.</i><br /><i>-----------------------------------------------------------------------------------</i><br />P1:&nbsp;<em>BEGIN</em>&nbsp;<b>NOT</b>&nbsp;ATOMIC<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Variables&nbsp;declarations</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Generic&nbsp;Variables</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;SQLCODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>INTEGER</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>DEFAULT</b>&nbsp;0;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;SQLSTATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>CHAR</u>(5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>DEFAULT</b>&nbsp;<s>'00000'</s>;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Generic&nbsp;handler&nbsp;variables</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;hSqlcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>INTEGER</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>DEFAULT</b>&nbsp;0;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;hSqlstate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>CHAR</u>(5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>DEFAULT</b>&nbsp;<s>'00000'</s>;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;<b>Local</b>&nbsp;Variables</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;vCurrentTimestamp&nbsp;&nbsp;&nbsp;<u>TIMESTAMP</u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;vAddByUserName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>VARCHAR</u>(50)&nbsp;&nbsp;&nbsp;<b>DEFAULT</b>&nbsp;<s>'EBIZ'</s>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;vQuoteTypeCode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>VARCHAR</u>(10);<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;vRenwlQuoteNum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<u>CHAR</u>(10);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;CONDITION&nbsp;declaration</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;(80100~80199)&nbsp;SQLCODE&nbsp;&&nbsp;SQLSTATE</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;sqlReset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CONDITION&nbsp;<b>for</b>&nbsp;sqlstate&nbsp;<s>'80100'</s>;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;<b>EXCEPTION</b>&nbsp;HANDLER&nbsp;declaration</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Handy&nbsp;Handler</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;CONTINUE&nbsp;HANDLER&nbsp;<b>FOR</b>&nbsp;sqlReset<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>BEGIN</em>&nbsp;<b>NOT</b>&nbsp;ATOMIC<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;hSqlcode&nbsp;&nbsp;&nbsp;=&nbsp;0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;hSqlstate&nbsp;&nbsp;=&nbsp;<s>'00000'</s>;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus&nbsp;=&nbsp;0;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Generic&nbsp;Handler</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>DECLARE</em>&nbsp;CONTINUE&nbsp;HANDLER&nbsp;<b>FOR</b>&nbsp;SQLEXCEPTION,&nbsp;SQLWARNING,&nbsp;<b>NOT</b>&nbsp;FOUND<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>BEGIN</em>&nbsp;<b>NOT</b>&nbsp;ATOMIC<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Capture&nbsp;SQLCODE&nbsp;&&nbsp;SQLSTATE</i><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SELECT</em>&nbsp;&nbsp;SQLCODE,&nbsp;SQLSTATE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>INTO</b>&nbsp;&nbsp;&nbsp;&nbsp;hSqlcode,&nbsp;hSqlstate<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>FROM</b>&nbsp;&nbsp;&nbsp;&nbsp;SYSIBM.SYSDUMMY1;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Use&nbsp;the&nbsp;hGenStatus&nbsp;variable&nbsp;<b>to</b>&nbsp;tell&nbsp;the&nbsp;procedure&nbsp;what&nbsp;<b>type</b></i><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;<b>of</b>&nbsp;error&nbsp;occurred.&nbsp;&nbsp;<b>In</b>&nbsp;some&nbsp;cases,&nbsp;it&nbsp;can&nbsp;be&nbsp;assigned&nbsp;<b>to</b>&nbsp;the</i><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;poGenStatus&nbsp;variable&nbsp;<b>to</b>&nbsp;be&nbsp;returned&nbsp;<b>to</b>&nbsp;the&nbsp;client.</i><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>CASE</b>&nbsp;hSqlstate<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>WHEN</b>&nbsp;<s>'02000'</s>&nbsp;<b>THEN</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus=5000;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>WHEN</b>&nbsp;<s>'42724'</s>&nbsp;<b>THEN</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus=3;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>ELSE</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus=2;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>&nbsp;<b>CASE</b>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Initialization</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;<em>reset</em>&nbsp;<b>all</b>&nbsp;output&nbsp;parameters&nbsp;<b>to</b>&nbsp;<b>NULL</b></i><br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus&nbsp;=&nbsp;0;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;vCurrentTimestamp&nbsp;=&nbsp;CURRENT&nbsp;<u>TIMESTAMP</u>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;piCreatorId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;COALESCE(piCreatorId,&nbsp;<s>''</s>);<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;piUserId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;COALESCE(piUserId,&nbsp;<s>''</s>);<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;piWebQuoteNum&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;COALESCE(piWebQuoteNum,&nbsp;<s>''</s>);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;make&nbsp;sure&nbsp;<b>all</b>&nbsp;required&nbsp;<b>input</b>&nbsp;parameters&nbsp;are&nbsp;<b>not</b>&nbsp;<b>null</b></i><br />&nbsp;&nbsp;&nbsp;&nbsp;<b>IF</b>&nbsp;(&nbsp;(RTRIM(piCreatorId)&nbsp;=&nbsp;<s>''</s>&nbsp;<b>AND</b>&nbsp;RTRIM(piWebQuoteNum)&nbsp;=&nbsp;<s>''</s>&nbsp;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>OR</b>&nbsp;(RTRIM(piUserId)&nbsp;=&nbsp;<s>''</s>)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />&nbsp;&nbsp;&nbsp;&nbsp;<b>THEN</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus&nbsp;=&nbsp;34100;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>RETURN</b>&nbsp;poGenStatus;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>&nbsp;<b>IF</b>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Procedure&nbsp;Body</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>-------------------------------------------------------------</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;<em>Reset</em>&nbsp;the&nbsp;<b>SQL</b>&nbsp;<b>values</b>&nbsp;<b>after</b>&nbsp;every&nbsp;<em>select</em>,&nbsp;<em>update</em>,&nbsp;<em>insert</em>&nbsp;&&nbsp;<em>delete</em></i><br />&nbsp;&nbsp;&nbsp;&nbsp;signal&nbsp;sqlReset;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;retrieves&nbsp;piWebQuoteNum&nbsp;<b>from</b>&nbsp;<b>table</b>&nbsp;WEB_QUOTE_TO_CREATOR_MAPPING</i><br />&nbsp;&nbsp;&nbsp;&nbsp;<b>IF</b>&nbsp;piWebQuoteNum&nbsp;=&nbsp;<s>''</s>&nbsp;<b>THEN</b><br />	&nbsp;&nbsp;<em>SELECT</em>&nbsp;<br />	&nbsp;&nbsp;&nbsp;&nbsp;WEB_QUOTE_NUM<br />	&nbsp;&nbsp;<b>INTO</b><br />	&nbsp;&nbsp;&nbsp;&nbsp;piWebQuoteNum<br />	&nbsp;&nbsp;<b>FROM</b>&nbsp;EBIZ1.WEB_QUOTE_TO_CREATOR_MAPPING<br />	&nbsp;&nbsp;<b>WHERE</b>&nbsp;CREATOR_ID&nbsp;=&nbsp;piCreatorId;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>&nbsp;<b>IF</b>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>SELECT</em>&nbsp;QUOTE_TYPE_CODE,RENWL_QUOTE_NUM<br />&nbsp;	<b>INTO</b>&nbsp;&nbsp;&nbsp;vQuoteTypeCode&nbsp;,&nbsp;vRenwlQuoteNum<br />	<b>FROM</b>&nbsp;EBIZ1.WEB_QUOTE<br />	<b>WHERE</b>&nbsp;WEB_QUOTE_NUM&nbsp;=&nbsp;&nbsp;piWebQuoteNum;<br />	<br />	<b>IF</b>&nbsp;vQuoteTypeCode&nbsp;=<s>'RNWLQUOTE'</s>&nbsp;<b>THEN</b><br />	&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;piWebQuoteNum&nbsp;=&nbsp;vRenwlQuoteNum;<br />	<em>END</em>&nbsp;<b>IF</b>;<br />	<br />&nbsp;&nbsp;&nbsp;&nbsp;<i>--&nbsp;Make&nbsp;sure&nbsp;does&nbsp;<b>not</b>&nbsp;exist&nbsp;already.&nbsp;&nbsp;<b>If</b>&nbsp;it&nbsp;does,&nbsp;<b>return</b>&nbsp;7003</i><br />&nbsp;&nbsp;&nbsp;&nbsp;signal&nbsp;sqlReset;<br />&nbsp;&nbsp;&nbsp;&nbsp;<b>IF</b>&nbsp;EXISTS&nbsp;(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SELECT</em>&nbsp;&nbsp;1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>FROM</b>&nbsp;EBIZ1.WEB_QUOTE_DLGTN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>WHERE</b>&nbsp;&nbsp;&nbsp;&nbsp;WEB_QUOTE_NUM&nbsp;=&nbsp;&nbsp;piWebQuoteNum<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>AND</b>&nbsp;&nbsp;USER_ID&nbsp;=&nbsp;&nbsp;piUserId<br />&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;<b>THEN</b><br />&nbsp;&nbsp;&nbsp;&nbsp;	<i>--&nbsp;<em>Insert</em>&nbsp;the&nbsp;<b>values</b></i><br />	<em>DELETE</em>&nbsp;<b>FROM</b>&nbsp;<br />			EBIZ1.WEB_QUOTE_DLGTN&nbsp;<br />		<b>WHERE</b><br />			WEB_QUOTE_NUM&nbsp;=&nbsp;&nbsp;piWebQuoteNum<br />			<b>AND</b>&nbsp;&nbsp;USER_ID&nbsp;=&nbsp;&nbsp;piUserId;<br />&nbsp;&nbsp;&nbsp;&nbsp;<b>ELSE</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>SET</em>&nbsp;poGenStatus&nbsp;=&nbsp;7003;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>RETURN</b>&nbsp;poGenStatus;<br />&nbsp;&nbsp;&nbsp;&nbsp;<em>END</em>&nbsp;<b>IF</b>;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<b>return</b>&nbsp;poGenStatus;<br /><br /><em>END</em>&nbsp;P1<br />@<br />CALL&nbsp;DTOL.G_SP_EXEC_GRP&nbsp;(<s>'EBIZ1'</s>,&nbsp;<s>'D_QT_DLGTN'</s>,&nbsp;<s>'prcbkweb'</s>)<br />@
    </div> 
  </body>
</html>
